// console.log(d3)
const dms = {
    width: 1000,
    height: 500,
    margin: {
        top: 50,
        left: 100,
        right: 100,
        bottom: 50
    }
}
dms.contentWidth = dms.width - dms.margin.left - dms.margin.right;
dms.contentHeight = dms.height - dms.margin.top - dms.margin.bottom;

const box = d3.select('#canvas').append('svg')
    .attr('id', 'box')
    .attr('width', dms.width)
    .attr('height', dms.height)

const content = box.append('g')
    .attr('id', 'content')
    .attr('transform', `translate(${dms.margin.left},${dms.margin.top})`);

// const yesLine = content.append('g')
//     .attr('id', 'yes-line')
//     .attr('transform', `translate(40,-20)`);


function drawChart(dataset) {
    // ... 内容
}

d3.json('sh_day.json')
    .then(drawChart);